package edu.scnu.fans.fingertip.item.api;

import edu.scnu.fans.fingertip.common.api.ApiResponse;
import edu.scnu.fans.fingertip.common.api.IdRequest;
import edu.scnu.fans.fingertip.item.output.ItemOutput;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * 商品 Feign 微服务调用接口
 */
@FeignClient("fingertip-item")
public interface ItemApi {

    @ApiOperation("商品详情")
    @PostMapping("/fingertip/item/v1/detail")
    ApiResponse<ItemOutput> detail(@RequestBody @Valid IdRequest input);

}
